package org.shagin.jfin.sheet;

import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Section {
	private static final Logger log = LoggerFactory.getLogger(Section.class);

	private List<SheetColumn<?>> columns = new LinkedList<SheetColumn<?>>();

	public Section() {
	}

	public boolean contains(SheetColumn<?> col) {
		return columns.contains(col);
	}

	public void add(SheetColumn<?> col) {
		if (!contains(col))
			columns.add(col);
		else
			log.warn("Column already contains");
	}

	public List<SheetColumn<?>> getColumns() {
		return Collections.unmodifiableList(columns);
	}
}
